package com.ujiuye.service;

import com.ujiuye.bean.StudentBean;
import com.ujiuye.dao.StudentDao;
import com.ujiuye.utils.PageUtils;

import java.util.List;

public class StudentService {
   private StudentDao sd=  new StudentDao();
   //添加方法
    public int addStudent (StudentBean student){
        return sd.addStudent(student);
    }
    //查询全部的方法
    public List <StudentBean> findAllStudentByPage(PageUtils pu){
        return sd.findAllStudentByPage(pu);
    }
    public int getTotalCount(){
        return  sd.getTotalCount();
    }
    //根据学号查询方法
    public StudentBean findStudentBySid(int sid){
        return sd.findStudentBySid(sid);
    }
    //修改信息
    public int updateStudent(StudentBean student){
        return  sd.updateStudent(student);
    }
    //删除
    public int deleteStudent(int sid){
        return  sd.deleteStudent(sid);
    }

    //查询用户
    public StudentBean checkSname(String sname){
        return sd.checkSname(sname);
    }
}
